<?php

namespace App\Models;


class Article extends Base
{
    /**
     * 属性修改器
     *
     * @param mixed $value
     * @return Article|mixed|void
     */
 public function setPidAttribute($value)
 {
    $this->attributes['pid'] = empty($value) ? '/uploads/'.rand(1,6).'.jpg':$value;
 }
}
